<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>if语句</title>
</head>
<body>
    <script>
        let age = 11;
        if(age >= 18){
            alert("已经成年了");
        }else{
            alert('未成年');
        }
    </script>
</body>
</html>